home *** CD-ROM | disk | FTP | other *** search
-
- (*
- *
- * (C) 1987 Samuel H. Smith, 26-apr-87 (rev. 10-Aug-87)
- *
- * This program is provided courtesy of:
- * The Tool Shop
- * Phoenix, Az
- * (602) 279-2673
- *
- * This program uses many of the building-blocks in the Tool Shop Library,
- * which is available for download from the Tool Shop. Compile using
- * TSHELL 1.2, also avaliable from the Tool Shop.
- *
- *
- * Disclaimer
- * ----------
- *
- * This software is completely FREE. I ask only for your comments,
- * suggestions and bug reports. If you modify this program, I would
- * appreciate a copy of the new source code. Please don't delete my
- * name from the program.
- *
- * I cannot be responsible for any damages resulting from the use or mis-
- * use of this program!
- *
- * If you have any questions, bugs, or suggestions, please contact me at
- * The Tool Shop, (602) 279-2673.
- *
- * Enjoy! Samuel H. Smith
- *
- *)
-
-
- {$c+} (* disable control character trap *)
- {$u+}
- {$r-,k-} (* enable range checking *)
- {$p800,d-} (* required for local-echo handler *)
- {$v-} (* allow variable length string params *)
-
-
- const
- whoami = 'Archive Text Viewer';
- version = 'v2.0, SYSTEM_DATE';
- comfile = 'ARCTV';
- scratchfile = 'SCRATCH.ARC';
-
- var
- ok: boolean;
- linenum: integer;
-
-
- (* libraries *)
-
- #include <anystring.inc> (* general string declaration *)
- #include <regpack.inc> (* register package declaration *)
- #include <strutil.inc> (* string utility macros *)
- #include <incdec.inc> (* scalar increment/decrement *)
- #include <getfile2.inc> (* expand wildcard file lists *)
- #include <rempath.inc> (* path/ext manipulation *)
- #include <ftoa.inc> (* float to ascii conversion *)
- #include <itoa1.inc> (* integer to ascii conversion *)
- #include <itoh.inc> (* integer to hex conversion *)
- #include <itou.inc> (* integer to unsigned-real conversion *)
- #include <ltor.inc> (* long-integer to real conversion *)
- #include <mdosio.inc> (* mini dos-file interface library *)
- #include <stoupper.inc> (* map string to upper case *)
- #include <openshar.inc> (* open shared files macro *)
- #include <wildcard.inc> (* wildcard comparison *)
-
- const
- graphics = false;
- lowtxt = '';
- hitxt = '';
- lowv = '';
- hiv = '';
- option = '';
- expert = true;
- dump_user = false;
- carrier_lost = '<lost>';
-
- type user_rec = record
- pagelen: integer;
- end;
-
- const
- user: user_rec = (pagelen:23);
-
-
- procedure make_log_entry(s:anystring;
- f:boolean);
- begin if f then writeln(s);
- end;
-
- procedure uninit_com; begin end;
-
- procedure newline; begin writeln;
- flush(output);
- INCR(linenum);
- end;
-
- procedure disp(s:longstring); begin write(s);
- end;
-
- procedure displn(s:longstring); begin write(s);
- newline;
- end;
-
- procedure input(var s:anystring;
- l:integer); begin flush(output);
- read(s);
- linenum := 1;
- end;
-
-
- #include "promsgs.inc" (* message/more processing *)
-
- #include "prounsq.inc" (* view archive text files *)
-
-
- (*
- * main program
- *
- *)
-
- var
- i,j: integer;
- par: anystring;
-
- begin
- linenum := 1;
-
- if paramcount = 0 then
- begin
- writeln;
- writeln(whoami,', ',version);
- writeln('Courtesy of: S.H.Smith and The Tool Shop BBS, (602) 279-2673.');
- writeln;
- writeln('Usage: arctv FILE[.arc] ... FILE [>OUT]');
- end;
-
- for i := 1 to paramcount do
- begin
- par := paramstr(i);
-
- if pos('.',par) = 0 then
- par := par + '.ARC';
- for j := 1 to LEN(par) do
- if par[j] = '/' then
- par[j] := '\';
-
- getfiles(par,filetable,filecount);
-
- for j := 1 to filecount do
- begin
- writeln;
- writeln('Archive: ',filetable[j]);
- linenum := 1;
- view_archive_text(filetable[j]);
- flush(output);
- end;
- end;
- end.
-